package net.wofly.sale.commodity.service.impl;

import net.wofly.sale.commodity.domain.ChannelCommodityTerminalMapping;
import net.wofly.sale.commodity.repository.ChannelCommodityTmlMappingRepository;
import net.wofly.sale.commodity.service.IChannelCommodityTmlMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service("iChannelCommodityTmlMappingService")
@Transactional
public class ChannelCommodityTmlMappingServiceImpl implements IChannelCommodityTmlMappingService {
    
    @Autowired
    ChannelCommodityTmlMappingRepository channelCommodityTmlMappingRepository;
    
    @Override
    public ChannelCommodityTerminalMapping findByChannel(String channel) {
        return channelCommodityTmlMappingRepository.findByChannel(channel);
    }
    
    @Override
    public List<ChannelCommodityTerminalMapping> findByCommodityTerminalType(Integer commodityTerminalType) {
        return channelCommodityTmlMappingRepository.findByCommodityTerminalType(commodityTerminalType);
    }
}
